package ma.shi.android;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.content.Intent;

public class game_view extends Activity{

	@Override
    public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
        setContentView(R.layout.game_view);
        life = (TextView) findViewById(R.id.Life);
        mana = (TextView) findViewById(R.id.mana);
        money = (TextView) findViewById(R.id.money);
        level = (TextView) findViewById(R.id.level);
        setStatus();
        Button back_to_characters = (Button)findViewById(R.id.back_to_characters);
        back_to_characters.setOnClickListener(new Button.OnClickListener()
        {
        	public void onClick(View v)
        	{
        		Intent intent = new Intent();
        		intent.setClass(game_view.this, characters.class);
        		startActivity(intent);
        		game_view.this.finish();
        	}
        });
        
        Button fight = (Button)findViewById(R.id.fight);
        fight.setOnClickListener(new Button.OnClickListener()
        {
        	public void onClick(View v)
        	{
        		Intent intent = new Intent();
        		intent.setClass(game_view.this, fight.class);
        		startActivity(intent);
        		game_view.this.finish();
        	}
        });
        
        Button person_item = (Button)findViewById(R.id.person_item);
        person_item.setOnClickListener(new Button.OnClickListener()
        {
        	public void onClick(View v)
        	{
        		Intent intent = new Intent();
        		intent.setClass(game_view.this, person_item.class);
        		startActivity(intent);
        		game_view.this.finish();
        	}
        });
	}
	
	private void setStatus()
	{
		life.setText("80/100");
		mana.setText("30/50");
		money.setText("500");
		level.setText("3");
	}
	
	private TextView life;
	private TextView mana;
	private TextView level;
	private TextView money;
	
}
